package com.care.wardmate.server.controller;

import com.care.common.core.domain.Result;
import com.care.wardmate.common.domain.Review;
import com.care.wardmate.server.service.ReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 33253
 */
@RestController
public class ReviewController {
    @Autowired
    private ReviewService reviewService;
    @GetMapping("selectReviewById/{articleId}")
    public Result<List<Review>> selectReviewById(@PathVariable Integer articleId){
        List<Review> result = reviewService.selectReviewById(articleId);
        return Result.success(result);
    }

}
